<?php
namespace jy_meye;
defined('BY_JYA') or exit('error');
/*
	订单
*/
class order extends \plugin{
	//确认收货，完成订单
	public function order_receive($order_id,$ismsg=false){
		$update=array('status'=>3,'finishtime'=>TIMESTAMP);
		$this->update('order',$update,array('id'=>$order_id,'uniacid'=>$_SESSION['uniacid']));
		$this->get_order($order_id);
		$notice_setting=$this->plugin_setting('notice');
		if(!$ismsg){
			$this->model('notice')->notice_receive2buyer($this->order);
			if($notice_setting['seller']){
				foreach($notice_setting['seller'] as $member){
					$this->model('notice')->notice_receive2seller($this->order,$member['mid']);
				}
			}
		}
	}
}